textbufferserialize: declare set_error as G_GNUC_PRINTF
authorBen Iofel <iofelben@gmail.com>
Mon, 17 Oct 2016 14:36:26 +0000 (10:36 -0400)
committerBen Iofel <iofelben@gmail.com>
Mon, 17 Oct 2016 14:36:26 +0000 (10:36 -0400)
And fix a missing format argument

gtk/gtktextbufferserialize.c

index 8baf780cc41adaa467d0ae09dc317fda896e9d3f..961d809c3476d11c54e299e09870b9a32bac3f70 100644 (file)
@@ -665,6 +665,14 @@ typedef struct
   gboolean parsed_tags;
 } ParseInfo;
 
+static void
+set_error (GError              **err,
+           GMarkupParseContext  *context,
+           int                   error_domain,
+           int                   error_code,
+           const char           *format,
+           ...) G_GNUC_PRINTF (5, 6);
+
 static void
 set_error (GError              **err,
            GMarkupParseContext  *context,
@@ -795,7 +803,7 @@ check_id_or_name (GMarkupParseContext  *context,
            {
              set_error (error, context,
                         G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
-                        _("<%s> element has invalid ID \"%s\""), attribute_values[i]);
+                        _("<%s> element has invalid ID \"%s\""), element_name, attribute_values[i]);
              return FALSE;
            }
        }